package com.gm.tools;

/**
 * Created by Mouse on 2017/8/4.
 */
public class Function {

    public static double sum(double... x) {
        double s = 0;
        for (int i = 0; i < x.length; i++)
            s += x[i];
        return s;
    }


    public static double avg(double... x) {
        int n = x.length;
        return sum(x) / n;
    }



//    static double variance(double... x) {
//
//    }
//
//    static double averageVariance(double... x) {
//
//    }


}
